package com.cy.pj.activity.controller;

import com.cy.pj.activity.pojo.Activity;
import com.cy.pj.activity.service.ActivityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class ActivityController {
    @Autowired
    private ActivityService activityService;

    @RequestMapping("/activity/doActivityUI")
    public String doActivityUI(){
        return  "activity";
    }
    /**查询所有活动信息*/
    @RequestMapping("/activity/doFindActivitys")
    @ResponseBody
    public List<Activity> doFindActivitys(){
        List<Activity> list =activityService.findActivitys();
        return list;
    }

}
